/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.equipment.dao;

import com.thinkgem.jeesite.common.persistence.CrudDao;
import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
import com.thinkgem.jeesite.modules.equipment.entity.EleEquipment;
import com.thinkgem.jeesite.modules.sys.entity.User;

import org.apache.ibatis.annotations.Param;

import java.sql.Date;
import java.util.List;

/**
 * 设备管理DAO接口
 * @author ZC
 * @version 2017-04-18
 */
@MyBatisDao
public interface EleEquipmentDao extends CrudDao<EleEquipment> {

    void saveFloorMapping(EleEquipment eleEquipment);

    int delApplyEquipmentStatus(@Param("equipments") String equipments, @Param("status") String status);
    int delApprovalEquipmentStatus(@Param("equipments") String equipments, @Param("status") String status);
    int bathcUpdateEquipmentStatus(@Param("equipments") String equipments, @Param("status") String status, @Param("checker") String checker);

    int eleEquipmentIsOnLine(@Param("mac") String mac, @Param("state") String state, @Param("stateDate") Date stateDate);

    EleEquipment findEquipmentByCode(@Param("code") String code);
    int saveConfig(EleEquipment equipment);
    int uploadingConfig(EleEquipment equipment);

    EleEquipment findEquipmentConfigByCode(String mac);
    void updatePublishStatus(@Param("publishId")String publishId,@Param("status")String status);
    void updateOnlineStatus(@Param("publishId")String publishId,@Param("status")String status);
    List<EleEquipment> findEleEquipmentForCheck(@Param("users")List<User> list,@Param("status")String status);

}